using System.Linq.Expressions;

namespace TestProject1;

class User
{
    public int Age { get; set; }
}

public class Tests
{
    [SetUp]
    public void Setup()
    {
        
    }

    [Test]
    public void Test1()
    {
        // 直接使用 Lambda 表达式定义表达式树
        Expression<Func<User, bool>> expression = u => u.Age > 18;
    }
}